Skip to content

Conversation

@AryanBagade
Copy link
Contributor

Changes

  1. Added range field to ReturnExplicit struct to track the return statement location
  2. Updated binding/function.rs to pass the range when creating ReturnExplicit
  3. Added type checking in solve.rs for bare return

Testing

  • ✅ Added 3 new test cases in returns.rs
CleanShot 2025-11-07 at 10 29 00@2x

Fixes #1508

## Changes

1. Added `range` field to `ReturnExplicit` struct to track the return statement location
2. Updated `binding/function.rs` to pass the range when creating `ReturnExplicit`
3. Added type checking in `solve.rs` for bare return

## Testing
  - ✅ Added 3 new test cases in returns.rs

Fixes facebook#1508
@meta-cla meta-cla bot added the cla signed label Nov 7, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 7, 2025

@kinto0 has imported this pull request. If you are a Meta employee, you can view this in D86550828.

Copy link
Contributor

@ndmitchell ndmitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

Copy link
Contributor

@yangdanny97 yangdanny97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

Copy link
Contributor

@grievejia grievejia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@AryanBagade
Copy link
Contributor Author

@yangdanny97 could you please let me know what changes i need to make as im not able to see why internal build & tests failed!!!

@rchen152
Copy link
Contributor

@AryanBagade I just checked, and it looks like the internal build was failing for an unrelated issue, and Danny's comment was resolved, so no action required here. Thanks for contributing this fix (for a slightly embarrassing bug XD), and sorry the internal review process is so opaque. We wanted to export the review status so contributors can see when their PR is approved, but we don't have fine-grained control over what information is exported.

@meta-codesync
Copy link

meta-codesync bot commented Nov 10, 2025

@yangdanny97 merged this pull request in fc91a0f.

@AryanBagade AryanBagade deleted the fix/bare-return-type-checking branch November 10, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missed type error for bare return statements

7 participants